class Solution {
    public int countGoodStrings(int low, int high, int zero, int one) {
        int[] dp = new int[100010];
        int ans = 0;
        int mod = (int)1e9 + 7;
        dp[0] = 1;
        for (int i = 1; i <= high; i++) {
            if (i - zero >= 0)
                dp[i] += dp[i - zero] % mod;
            if (i - one >= 0)
                dp[i] += dp[i - one] % mod;
            dp[i] %= mod;
            if (i >= low) {
                ans += dp[i];
                ans %= mod;
            }
        }
        return ans;
    }
}